import request from '@/utils/request'
export function fetchDepartmentList() {
  return request({
    url: '/company/department',
    method: 'get'
  })
}

export function getManager() {
  return request({
    url: '/sys/user/simple',
    method: 'get'
  })
}

export function addFormInfo(data) {
  return request({
    method: 'post',
    url: '/company/department',
    data
  })
}

export function getdataInfo(id) {
  return request({
    method: 'get',
    url: `/company/department/${id}`
  })
}

export function modyInfo(data) {
  return request({
    method: 'put',
    url: `/company/department/${data.id}`,
    data
  })
}

export function delInfo(id) {
  return request({
    url: `/company/department/${id}`,
    method: 'delete'
  })
}
